require('babel-register');
require('babel-polyfill');

const ip = require('ip');
const app = require('./app');
const { PORT } = require('../config');

const isDev = process.env.NODE_ENV !== 'production';

// 监听端口
app.listen(PORT);
const url = `http://${ip.address()}:${PORT}`;
if (isDev) require('open')(url);
console.log(`the server is start at：${url}`);
